﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace VietPublisher.BaseProject.Utils.SiteMaps
{
    class SiteImpl :Site
    {
	private Site[] children = null;

	private String label;

	private String url;

	public SiteImpl(String label, String url,Site[] children) {
		this.label = label;
		this.url = url;
		this.children = children;
	}

	/**
	 * Return a list of children that belong to this site. The
	 * iterator is immutable and calling the remove method will
	 * result in an exception.
	 */
	public List<Site> getChildren() {
		return new List<Site>(children);
	}

	/**
	 * Return the definition label for the book or page.
	 */
	public String getLabel() {
		return label;
	}

	/**
	 * Return the URL for the book or page.
	 */
	public String getUrl() {
		return url;
	}

	/**
	 * Returns true if this is a book. 
	 */
	public Boolean isBook() {
		return children != null;
	}

    }//close siteImpl class
}
